package com.firexxx.study.lock.monitor.markword;

import lombok.Getter;
import lombok.Setter;
import org.springframework.stereotype.Service;

/**
 * @description: 无锁
 * @author: zhuangzhang2
 * @date: 2020-12-19 14:24
 */
@Getter
@Setter
public class MarkBiasedLock implements IMarkLock {

    /**
     * 偏向锁指向的线程
     */
    private long threadId = 0;

    private long epoch = 0;

    /**
     * 分代年龄
     */
    private long age = 0;

    @Override
    public MarkWordLockType getLockType() {
        return MarkWordLockType.biasedLock;
    }
    
}
